package org.dxy.domain.event.product;

import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * @description: 产品审核驳回事件
 * @author: dxy
 * @createTime: 2025/8/17
 */
public record ProductRejectedEvent(
    /**
     * 产品ID
     */
    Long productId,
    
    /**
     * 驳回原因
     */
    String reason
) implements DomainEvent {
    
    @Override
    public Long aggregateId() {
        return productId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.PRODUCT.getKey();
    }
    
    @Override
    public String eventType() {
        return ProductEventTypeEnum.REJECTED.getKey();
    }
}